import 'package:flutter/material.dart';
import 'package:get/get.dart';

class TipsCard extends StatelessWidget {
  String favicon;
  String name;
  TipsCard({Key key, this.favicon, this.name}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return getCard();
  }

  getCard() {
    return GestureDetector(
      child: Container(
        decoration: BoxDecoration(
          borderRadius: BorderRadius.all(Radius.circular(5.0)),
          color: Colors.white,
          boxShadow: [
            BoxShadow(
                color: Colors.grey[400],
                offset: Offset(0, 1), // 偏移量
                blurRadius: 2),
          ],
        ),
        child: Padding(
          padding: EdgeInsets.only(left: 20, right: 20, bottom: 10, top: 10),
          child: Container(
            height: 50,
            width: double.infinity,
            child: Row(
              children: [
                Container(
                  width: 50,
                  height: 50,
                  child: ClipRRect(
                      borderRadius: BorderRadius.all(Radius.circular(5)),
                      child: Image.network(
                        this.favicon,
                        fit: BoxFit.cover,
                      )),
                ),
                SizedBox(
                  width: 20,
                ),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text(
                        this.name,
                        style: TextStyle(
                            fontWeight: FontWeight.w600, color: Colors.black87),
                      ),
                    ],
                  ),
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}
